:root {
    --primary-color: #2c83d9;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

.main-container {
    background: #f8f9fa;
    height: 100vh; /* 修复高度 */
    /*height: 100%; !* 继承父级高度 *!*/
    /*min-height: inherit; !* 继承父级min-height *!*/
    display: flex;
    flex-direction: row;
    overflow: hidden; /* 禁止外层滚动 */
}

.nav-sidebar {
    width: 260px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    padding: 1rem;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 内容不溢出 */
}

.top-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    gap: 1rem;
}

.filter-section {
    flex-grow: 1;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-bottom: 4rem; /* 按钮区域留白 */
}

.bottom-section {
    flex: 1;
    overflow-y: auto; /* 仅此区域滚动 */
    padding: 1.5rem;
}



/* 用例卡片 */
.test-case-card {
    /*transition: all 0.3s ease;*/
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    margin-bottom: 1rem;

}

.test-case-card:hover {
    box-shadow: 0 2px 8px rgba(44, 131, 217, 0.1);
    transform: translateY(-1px);
}

/* 协议标签 */
.protocol-tag {
    background: #e3f2fd;
    color: #2c83d9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* 状态徽章 */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.9em;
}

.status-badge.success {
    background: #e8f5e9;
    color: #28a745;
}

.status-badge.danger {
    background: #f8d7da;
    color: #dc3545;
}

/* 操作按钮 */
.btn-group .btn {
    border-radius: 20px !important;
    padding: 5px 15px;
}


.action-toolbar {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        /*height: auto; !* 移动端恢复自动高度 *!*/
        min-height: 0; /* 允许内容收缩 */
    }

    .nav-sidebar {
        width: 100%;
        height: auto;
        box-shadow: none;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .action-toolbar {
        position: static; /* 移动端恢复默认定位 */
        margin-top: 1rem;
        justify-content: flex-end;
        width: 100%;
    }

    .filter-section {
        padding-bottom: 1.5rem; /* 移动端调整留白 */
    }

    .top-section {
        flex-direction: column;
    }
}

/* 添加滚动条限制 */
.bottom-section::-webkit-scrollbar {
    width: 6px;
}

.bottom-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.bottom-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}